<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改评价结果')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-taskResult-edit" th:object="${evaTaskResult}">
            <input name="taskResuletId" th:field="*{taskResuletId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">任务id：</label>
                <div class="col-sm-8">
                    <input name="taskId" th:field="*{taskId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">合约方id：</label>
                <div class="col-sm-8">
                    <input name="targetId" th:field="*{targetId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">任务名称：</label>
                <div class="col-sm-8">
                    <input name="taskName" th:field="*{taskName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">合约方类型：</label>
                <div class="col-sm-8">
                    <select name="targetClass" class="form-control m-b" th:with="type=${@dict.getType('contract_party_type')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{targetClass}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">合约方名称：</label>
                <div class="col-sm-8">
                    <input name="targetName" th:field="*{targetName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">年份：</label>
                <div class="col-sm-8">
                    <input name="year" th:field="*{year}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">评分：</label>
                <div class="col-sm-8">
                    <input name="score" th:field="*{score}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">评级：</label>
                <div class="col-sm-8">
                    <select name="rating" class="form-control m-b" th:with="type=${@dict.getType('credit_rating')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{rating}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">附件地址：</label>
                <div class="col-sm-8">
                    <input name="filePath" th:field="*{filePath}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "credit/taskResult";
        $("#form-taskResult-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-taskResult-edit').serialize());
            }
        }
    </script>
</body>
</html>